import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./plugins/element.js";
// 导入全局CSS
import "./assets/css/global.css";
import shios from "./plugins/shios";
import assert from "./plugins/assert.js";
// 导入 axios
import axios from "axios";

axios.defaults.baseURL = "https://localhost:5001/api/";
axios.interceptors.request.use((config) => {
  config.headers.Authorization = window.sessionStorage.getItem("token");
  return config;
});
Vue.prototype.$http = axios;
shios.baseUrl = "https://localhost:5001/api/";
Vue.prototype.$myhttp = shios;
Vue.prototype.assert = assert;
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
